import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:1 1 2 3 5 8 13 21
 * 当求第5项的时候
 * 
 * a=1
 * b=1
 * c=a+b=2
 *
 * a=b=1
 * b=c=2
 * c=a+b=3
 *
 * a=b=2
 * b=c=3
 * c=a+b=5
 */
public class TestDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = Fib(n);
        System.out.println(k);
    }
    
    public static int Fib(int n ){
        if(n <= 2){
            return 1;
        }
        else{
            int a = 1;
            int b = 1;
            int c = 2;
            for (int i = 3; i < n ; i++) {
                a = b;
                b = c;
                c = a + b;
            }
            return c;
        }
    }
}
